package com.matrix.java.chap_05;

/*
    计算 e
 */
public class Ex5_26 {
    public static void main(String[] args) {
        double e = 1;
        int num = 100000;
        double item = 1;
        for (int i = 1; i < num; i++) {
            item /= i;
            e += item;
            if (i % 10000 == 0) {
                System.out.println(e);
            }
        }

    }
}
